Page({
  data: {
    min: 26,
    max: 60,
    count: 26,
    unit: '公斤',
    screenWidth: wx.getSystemInfoSync().screenWidth
  },
  onLoad() {
  },
  bindscroll(e) {
    let { scrollLeft, scrollWidth } = e.detail
    let { screenWidth, min, max, count } = this.data
    let totalLength = scrollWidth - screenWidth
    let progress = scrollLeft / totalLength
    this.setData({
      count: ((min + ((max - min) * progress)).toFixed(1)).replace(/\.0/, '')
    })
  },
})